import java.util.Scanner;
public class sushu {
public static void main(String[] args) {
        System.out.println("请输入一个整数: ");
        Scanner shuzi = new Scanner(System.in);
        int n = shuzi.nextInt();
        System.out.println("n以内的素数：");
        for(int i = 2;i <= n;i++)
        {
                for(int j = 2;j <= n;j++)
                        if(i%j == 0)
                        {
                                if(j < i)
                                        break;
                                if(j == i)
                                        System.out.println(+i);
                        }
        }
}
}

